﻿using Dapper;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Asion.Dapper
{
    public interface IMultipleCrudRepository<TEntity> : IRepository
    {
        /// <summary>
        /// 多个查询执行
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="sql"></param>
        /// <param name="param"></param>
        /// <returns></returns>
        Tuple<ResultA, ResultB> QueryMultiple<ResultA, ResultB>(string sql, object? param = null);


        /// <summary>
        /// 多个查询执行
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="sql"></param>
        /// <param name="param"></param>
        /// <returns></returns>
        Tuple<ResultA, ResultB, ResultC> QueryMultiple<ResultA, ResultB, ResultC>(string sql, object? param = null);


        /// <summary>
        /// 多个查询执行
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="sql"></param>
        /// <param name="param"></param>
        /// <returns></returns>
        Tuple<ResultA, ResultB, ResultC, ResultD> QueryMultiple<ResultA, ResultB, ResultC, ResultD>(string sql, object? param = null);
    }
}
